<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>视频播放</title>
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />
    <meta http-equiv="keywords" name="keywords" content="" />
    <meta http-equiv="description" name="description" content="" />
    <link href="css/ydui.css" rel="stylesheet" />
	<script src="js/ydui.flexible.js"></script>
	<link rel="stylesheet" type="text/css" href="css/all.css?v=201850002"/>
</head>
	<body style="background: #000;">
		<div id="divVideo" style="margin-top: 3rem;">
			
		</div>
	</body>
    <script src="https://cdn.bootcss.com/jquery/2.2.0/jquery.min.js"></script>
	<script src="js/ydui.js"></script>
    <script src="https://cdn.bootcss.com/vue/2.5.17-beta.0/vue.min.js"></script>

	<script src="js/all.js" type="text/javascript" charset="utf-8"></script>
	<script>
		var model = new Vue({
			el:"#app",
			data:{
				path:ComFunJS.getQueryString('path'),
				imgpath:ComFunJS.getQueryString('imgpath'),				
			},
			methods:{
		        CreateVideo: function(){
		            //获取图片地址
		            var imgSrc = model.imgpath;
		            var videoSrc =model.path;
		            //生成视频播放器Html
		            var videoHtml = "<video controls onPlay='ture' style='width:100%;height:375px' onClick='if(/Android/.test(navigator.userAgent))this.play();' poster='";
		            videoHtml += imgSrc + "'>";
		            videoHtml += "<source type='video/mp4' src='" + videoSrc + "' />";
		            videoHtml += "</video>";
		            //将播放器HTMl放到Document中
		            $("#divVideo").html( "" + videoHtml);
		        }					
			},
			mounted:function(){
				this.$nextTick(function(){
					model.CreateVideo()
				})
			}
			
						
		})
	</script>
</html>
